if word 1 of the text of cast WhatText = line the value of line Count2 of Order of the text of cast "Words" then
set Temp to 1
if line Count2 of UsedUp = "No" then
set Score1 to Score1 + 1
end if
put "Yes" into line Count2 of UsedUp
end if
end repeat
if Temp = 0 then
set WordsWrong to WordsWrong & line 1 of the text of cast WhatText & ", "
end if
end repeat
delete char the length of WordsWrong of WordsWrong
delete char the length of WordsWrong of WordsWrong
set WordsWrong to WordsWrong & "."
set Msg to "You entered a total of " & Total & " words and out of those, you got " & Score1 & " right."
if WordsWrong <> "." then
set Msg to Msg & " The words you entered that were not shown to you were: " & WordsWrong
end if
put Msg into field "MsgBox2"
cursor(-1)
ShowBox()
end
on Compute2
global NumberOfQuestions, QuestionNum, Order, UsedUp, Score2, Counter
set Temp to 0
put Counter
if word 1 of the text of cast "Input" = line the value of line Counter of Order of the text of cast "Words" then
if line Counter of UsedUp = "No" then
set Score2 to Score2 + 1
end if
put "Yes" into line Counter of UsedUp
ShowHint()
exit
else
beep()
WrongAnswer()
end if
put "Yes" into line Counter of UsedUp
end
on WrongAnswer
global Counter, Order
put "I'm sorry, that is incorrect. The correct word was " & line the value of line Counter of Order of the text of cast "Words" & "." into field "MsgBox"
ShowBox()
end
on ShowHint
global NumberOfQuestions, UsedUp, Order, OldCount, Counter
put EMPTY into field "Input"
repeat with Counter = 1 to NumberOfQuestions
if line Counter of UsedUp = "No" then
put line the value of line Counter of Order of the text of cast "Hints" into field "HintBox"
exit
end if
if Counter = NumberOfQuestions then
EndGame()
exit
end if
end repeat
end
on EndGame
global Score1, Score2, Total, stage
set stage to 10
put "You got " & Score1 & " right without hints and got " & Score2 & " right after having hints! Your score is " & score() & "." into field "MsgBox"
ShowBox()
end
on score
global Score1, Score2, Total, stage, MemoryTesting
set GameScore to (800 * Score1) - (250 * (Total - Score1)) + (500 * Score2)